-- GENERATED SPELL FOR [Trapdoor Crawler] --


function spell0_28221(pUnit, Event) --@Unburrow,Self--
pUnit:FullCastSpellOnTarget(50984,pUnit)
pUnit:RegisterEvent('Sorts_28221', 615, 1)
end

function Sorts_28221(pUnit, Event)
local choix_sorts_28221 = math.random(0, 0)
if choix_sorts_28221 == 0 then
pUnit:RegisterEvent('spell0_28221', 1, 1)
end
end

function mob28221_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28221', math.random(1500, 3000), 1)
end

function mob28221_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28221_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28221_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28221, 1, 'mob28221_Action')
RegisterUnitEvent(28221, 2, 'mob28221_Leave')
RegisterUnitEvent(28221, 3, 'mob28221_Kill')
RegisterUnitEvent(28221, 4, 'mob28221_Die')
